import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-05-11
 * Time: 21:52
 */
//递归求解汉诺塔问题
public class test {
    public static void main(String[] args) {
        Scanner f=new Scanner(System.in);
        int n=f.nextInt();
        long k=fun(n);
        System.out.println(k);
    }
    public static long fun(int n){
        if(n==1)
            return 1;
        return 2*fun(n-1)+1;
    }
}
